Viking gear
Gear Gifts and Apparel
PHP Gallery
PHP Gallery is a free php image script.
Evil gear
Christmas is almost here
Sell your soul
Believeth in me an hath everlasting life

here are some of the best and useful php scripts and snippets to help in your projects. Php displayed below. Use the search for specific script lookups. Click the category links to view scripts in Javascript and cgi. To add your own script click the link and add your useful script example.

host block site access if empty host or useragent is detected. legitimate visitors will have a host or ip as host and user agent if no host is detected it is a server and unusual and not a ISP

empty no host detected useragent
empty-host-block date added Jan 2013

PHPSTARTphp


$ip = $_SERVER['REMOTE_ADDR'];

$host = gethostbyaddr($ip);

$ua = $_SERVER['HTTP_USER_AGENT'];
//echo $ua;
if(empty($host)){
    echo "Failed visitor scan 1";
    exit;
}else{
if(empty($ua)){
    echo "Failed visitor scan 2";
    exit;
}
else{
    echo "Welcome"; //comment out welcome messages if desired
}
}
PHPEND


Add your comment.













No comments yet

Search ScriptsnTips


Php JavaScripts CGI/Perl